﻿<html>
<head>
<title>Online Payment</title>
<script type="text/javascript">
   function validate()
   {
	if(document.myform.username.value.length==0)
	{
	    alert(" enter User Name");
	    return false;
	}
         if  (document.myform.cdno.value.length!=16)
            {
	    alert("credit card no should be 16 digit");
	    return false;
	}
        if(document.myform.amount.value.length==0)
	{
	    alert("enter amount");
	    return false;
	}

   }

</script>
</head>
<body>
<form method="post" action="lastpage.jsp" name="myform" onsubmit="return validate()">

<table width="238" border="0" align="center">

    <caption ><font size="6" face="calibri">ONLINE PAYMENT</font></caption>
            <tr>
            <td width="84" height="48" align='center'><span lang="en-us">UserName</span></td>
            <td width="138" align='center'><span lang="en-us"><input type="text" name="username" size="20"/></span></td>
    </tr>
            <tr>
            <td align='center'><span lang="en-us">Credit Card No. </span></td>
            <td align='center'><span lang="en-us"><input type="text" name="cdno" size="20"/></span></td>
            </tr>
            <tr>
            <td align='center'><span lang="en-us">Amount</span></td>
            <td align='center'><span lang="en-us"><input type="text" name="amount" size="20"/></span></td>
            </tr>
<%String total=request.getParameter("total");%>
<input type="hidden" name="too" value=<%=total%>>
      
          <table align="center">
            <tr align="center">
            <th>
                <input type="submit" value="Submit" />
            </th>
            </tr>
          </table></table>
</form>
</body>
</html>
